package cn.com.self.apis.portal.entity;

import cn.com.self.apis.files.entity.Files;
import cn.com.selfsoft.smartcity.commons.entity.AbstractEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.List;

/**
 * 需求竞标信息
 *
 * @author CRL
 * @date 2021/1/9 21:28
 */
@EqualsAndHashCode(callSuper = true)
@TableName("u_requirements_bidding")
@Data
public class RequirementsBiddingEntity extends AbstractEntity {

    @NotNull(message = "会员id不能为空")
    @NotBlank(message = "会员id不能为空")
    @ApiModelProperty(value = "会员id")
    private BigInteger requirementsId;

    @ApiModelProperty(value = "报价")
    private BigInteger quotedPrice;

    @ApiModelProperty(value = "状态（1待审核、2中标、3淘汰、4取消）")
    private String biddingState;

    @ApiModelProperty(value = "描述")
    private String content;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "删除状态（字典 delFlag 0正常 1已删除）")
    private String delFlag;

    @TableField(exist = false)
    @ApiModelProperty(value = "附件出参")
    private List<Files> files;

    @ApiModelProperty(value = "竞标时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp time;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @CreatedDate
    private Timestamp createDate;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @LastModifiedDate
    private Timestamp updateDate;

}
